package com.annotation;

import com.action.ActionForm;
import com.action.BaseAction;

public class RegistMyPage implements BaseAction {

	@Override
	@ControlerInfo(path="/regist.do", formValue="com.annotation.RegistBean", successPath="/view/test/testsuccess.jsp", failPath="/view/test/testfailure.jsp")
	public String excute(ActionForm af, String successPath, String failPath) {
		RegistBean register = null;
		try{
			register = (RegistBean)af;
		}catch(Exception e){
			register = null;
		}
		if (null!=register&&null!=register.getWorld()&&register.getWorld().toLowerCase().indexOf("ok")>-1){
			System.out.println(successPath + "===================================");
			return successPath;
		}else{
			System.out.println(failPath + "===================================");
			return failPath;
		}
	}

}
